package qlsl.androiddesign.adapter.subadapter;

import java.util.List;

import qlsl.androiddesign.activity.baseactivity.BaseActivity;
import qlsl.androiddesign.adapter.baseadapter.BaseAdapter;
import qlsl.androiddesign.util.commonutil.ImageUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.qlsl.androiddesign.demo.R;

public class SquareImageAdapter extends BaseAdapter<String> {

	public SquareImageAdapter(BaseActivity activity, List<String> list) {
		super(activity, list);
	}

	public View getView(int position, View convertView, ViewGroup parent) {
		convertView = getItemView(convertView, R.layout.listitem_square_image);

		ImageView iv_icon = getView(convertView, R.id.iv_icon);

		String url = getItem(position);

		ImageUtils.rect(activity, url, iv_icon);

		return convertView;
	}
}
